package kr.nexmore.slmsample2.dao;

import java.util.List;

import kr.nexmore.slmsample2.util.MyBatisConnectionFactory;
import kr.nexmore.slmsample2.vo.HandiVo;

import org.apache.ibatis.session.SqlSession;

public class MyHandiDao {
	
	

	public List<HandiVo> select() {


		List<HandiVo> result = null;

		SqlSession session = MyBatisConnectionFactory.openSession();


		result = session.selectList("Test.getListHandi");

		for (HandiVo h : result)
			System.out.println(h.getName());

		session.close();

		return result;
	}

	public void insert(HandiVo vo) {
		SqlSession session = MyBatisConnectionFactory.openSession();

		int pk = session.insert("Test.insertHandi", vo);
		session.commit();
		session.close();

	}

}
